<template>
    <div class="list_page_pagination">
        <el-pagination
            :current-page="currentPage"
            :layout="layout"
            :page-size="pageSize"
            :total="total"
            background
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange">
        </el-pagination>
    </div>
</template>

<script>
export default {
    name: "pagination",
    props: {
        pageSize: Number,
        total: Number,
        currentPage: Number,
        layout: String,
    },
    methods: {
        handleSizeChange(val) {
            this.$emit('sizeChange', val);
        },
        handleCurrentChange(val) {
            this.$emit('currentChange', val);
        }
    }
}
</script>
<style lang="scss">
.list_page_pagination {
    padding-left: 10px;
    float: right;
    
    .el-pagination {
        margin: 5px;
        
        .el-pagination__sizes, .el-pagination__total, .btn-prev, .btn-next {
            height: 30px;
            line-height: 30px;
        }
        
        .el-pager {
            li {
                height: 30px;
                line-height: 30px;
            }
        }
        
    }
}
</style>
